package de.hochschuletrier.bachelor.antfarm.util;

import java.util.HashMap;

import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.Sound;

import de.hochschuletrier.bachelor.antfarm.util.assets.AssetImage;
import de.hochschuletrier.bachelor.antfarm.util.assets.AssetSound;

public class AssetManager {
	private static AssetManager instance;
	private HashMap<AssetImage,Image> images;
	
	public AssetManager() {
		instance = this;
		
		images = new HashMap<AssetImage,Image>();
		
		try {
			images.put(AssetImage.ant,new Image("./res/img/dummy_ant.png"));
			images.put(AssetImage.nest,new Image("./res/img/dummy_nest.png"));
			images.put(AssetImage.foodSource,new Image("./res/img/dummy_foodsource.png"));
			images.put(AssetImage.pheromon,new Image("./res/img/dummy_pheromon.png"));
			images.put(AssetImage.ant_with_food,new Image("./res/img/dummy_ant_with_food.png"));
		}
		catch (SlickException e) {
			e.printStackTrace();
		}
	}
	
	public static AssetManager getInstance() {
		if (instance == null) {
			new AssetManager();
		}
		return instance;
	}
	
	public Image getImage(AssetImage type) {
		return images.get(type);
	}
	
	public Sound getSound(AssetSound type) {
	return null;
	}
}
